﻿<%@ Page Language="C#" MasterPageFile="~/InventoryTracker/MasterPage.master" AutoEventWireup="true" CodeFile="LGView.aspx.cs" Inherits="InventoryTracker_LGView" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="maincontent" Runat="Server">

<div id="projectreport">
        <a name="content_start0" id="content_start0"></a>
        <fieldset>
        <h2 class="none">
        View Master</h2>
        <legend>View Information</legend>
        <div class="formsection">
        View</div>
        
        <asp:Label ID="lblInvNo" runat="server" Text="Invoice No."></asp:Label>
        <br />
        <asp:DropDownList ID="DdlInvNo" runat="server" AutoPostBack="True" 
                DataSourceID="SqlDSInvNo" DataTextField="InvoiceItem" 
                DataValueField="InvoiceNumber"></asp:DropDownList>
        
            <asp:SqlDataSource ID="SqlDSInvNo" runat="server" 
                ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                SelectCommand="SELECT [InvoiceNumber], [InvoiceItem] FROM [InvoiceDetails]">
            </asp:SqlDataSource>
        
        <asp:GridView ID="GridView1" runat="server" CellPadding="4" 
                DataSourceID="SqlDSGV" ForeColor="#333333" GridLines="None" 
                AutoGenerateColumns="False">
            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
            <Columns>
                <asp:BoundField DataField="InvoiceItem" HeaderText="InvoiceItem" 
                    SortExpression="InvoiceItem" />
                <asp:BoundField DataField="ItemDescription" HeaderText="ItemDescription" 
                    SortExpression="ItemDescription" />
                <asp:BoundField DataField="InvoiceItemRate" HeaderText="InvoiceItemRate" 
                    SortExpression="InvoiceItemRate" />
                <asp:BoundField DataField="InvoiceItemQty" HeaderText="InvoiceItemQty" 
                    SortExpression="InvoiceItemQty" />
                <asp:BoundField DataField="InvoiceTotalAmount" HeaderText="InvoiceTotalAmount" 
                    SortExpression="InvoiceTotalAmount" />
            </Columns>
            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <EditRowStyle BackColor="#999999" />
            <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
            </asp:GridView>
        
        
            <asp:SqlDataSource ID="SqlDSGV" runat="server" 
                ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                SelectCommand="SELECT [InvoiceItem], [ItemDescription], [InvoiceItemRate], [InvoiceItemQty], [InvoiceTotalAmount] FROM [InvoiceDetails] WHERE ([InvoiceNumber] = @InvoiceNumber)">
                <SelectParameters>
                    <asp:ControlParameter ControlID="DdlInvNo" Name="InvoiceNumber" 
                        PropertyName="SelectedValue" Type="Int32" />
                </SelectParameters>
            </asp:SqlDataSource>
        
        
        
        
        
        
        
        

            
        
        
        
        
        
        
        
        

<div class="formsection">
        <asp:Button ID="btnDelete" runat="server" Text="Delete" 
            onclick="btnDelete_Click" />
        <asp:Button ID="btnUpdate" runat="server" Text="Update" 
            onclick="btnUpdate_Click" />
        <asp:Button ID="btnInsert" runat="server" Text="Insert" />
        
        
        </div>
        </fieldset>
    </div>


</asp:Content>

